package com.tea.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tea.Model.DynamicType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 商家动态分类Mapper接口
 */
@Mapper
public interface DynamicTypeMapper extends BaseMapper<DynamicType> {

    /**
     * 查询所有动态分类，按排序字段排序
     * @return 动态分类列表
     */
    @Select("SELECT * FROM dynamic_type WHERE deleted = 0 ORDER BY sort_order ASC, dynamic_type_id ASC")
    List<DynamicType> selectAllTypesOrderBySort();
}